#ifndef TIPOSCOMUNES_H_INCLUDED
#define TIPOSCOMUNES_H_INCLUDED
#include <string>
#include <stdexcept>
#include <algorithm>
enum OPERACIONBLOQUE{
    EXITO,
    FALLA,
};


// Trim Both leading and trailing spaces
static inline std::string Trim(std::string  str){

    std::size_t startpos = str.find_first_not_of(" \t"); // Find the first character position after excluding leading blank spaces
    std::size_t endpos = str.find_last_not_of(" \t"); // Find the first character position from reverse af

    // if all spaces or empty return an empty string
    if(( std::string::npos == startpos ) || ( std::string::npos == endpos))
    {
        return "";
    }
    else
        return str.substr( startpos, endpos-startpos+1 );

}
static inline std::string toUpper(std::string  str){
    //std::transform(str.begin(), str.end(),str.begin(), ::toupper);
    return str;
}

class ConfigurationKeyNotFoundException: public std::runtime_error{
public:
    ConfigurationKeyNotFoundException(const std::string& msg=0):std::runtime_error(msg){}
};


#endif // TIPOSCOMUNES_H_INCLUDED
